<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1.计算出字符串中出现次数最多的字符是什么，出现了多少次？
        let str = 'dfsgssdfgsg';
        let arr = str.split('');
        let obj = {};
        arr.forEach(function(v,i){
            if(v in obj){
                obj[v]++
            }else{
                obj[v]=1
            }
        })
        let num = 0;
        let numer = '';
        for (k in obj){
            if (obj[k] > num){
                num = obj[k];
                numer = k
            }
        }
        console.log(num,numer);




        // 2.有一个页面，上面各种标签，请用js 给每个文本赋值？


        // 3.请写出下面所示的控件的html 代码？
    </script>
</body>
</html>